package cn.iocoder.yudao.module.product.selection.pojo.vo;

import cn.iocoder.yudao.framework.business.basic.pojo.dto.SaveDTO;
import cn.iocoder.yudao.framework.validation.InEnumValue;
import cn.iocoder.yudao.framework.validation.Percent;
import cn.iocoder.yudao.module.api.supply.enums.SupplyDataSourceEnum;
import cn.iocoder.yudao.module.api.supply.enums.SupplySpuStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import lombok.Data;

/**
 * <pre>
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 *  这里是文件说明
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 * </pre>
 *
 * @author 山野羡民（1032694760@qq.com）
 * @since 2025/03/11
 */
@Data
public class ProductSupplySelectionSaveDTO extends SaveDTO {

    @Schema(description = "来源：0-自有、1-甄新汇选", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @InEnumValue(SupplyDataSourceEnum.class)
    private Integer source;

    @Schema(description = "产品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "产品编号不能为空")
    private Long spuId;

    @Schema(description = "产品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "iPhone 15 Pro")
    @NotBlank(message = "产品名称不能为空")
    private String spuName;

    @Schema(description = "产品主图", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://example.com/iphone.jpg")
    @NotBlank(message = "产品主图不能为空")
    private String spuPicUrl;

    @Schema(description = "分类编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "分类编号不能为空")
    private Long categoryId;

    @Schema(description = "分类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "手机")
    @NotBlank(message = "分类名称不能为空")
    private String categoryName;

    @Schema(description = "品牌编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "品牌编号不能为空")
    private Long brandId;

    @Schema(description = "品牌名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "Apple")
    @NotBlank(message = "品牌名称不能为空")
    private String brandName;

    @Schema(description = "单位名称", example = "件")
    private String unitName;

    @Schema(description = "状态：1-已下架、2-已上架", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @InEnumValue(SupplySpuStatusEnum.class)
    private Integer status;

    @Schema(description = "是否多规格", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
    private Boolean multiSpec;

    @Schema(description = "成本价，单位为分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
    @Positive
    private Integer costPrice;

    @Schema(description = "建议零售价，单位为分", example = "100")
    @Positive
    private Integer marketPrice;

    @Schema(description = "利润百分比（0-100）", example = "30")
    @Percent
    private Double profitPercent;

}
